package com.vcc.msc.sbs;

import android.os.Bundle;
import android.view.KeyEvent;
import android.webkit.WebView;

public class BalanceActivity extends ParentActivity {
	WebView webview;

	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.balance);

		webview = (WebView) findViewById(R.id.webView1);
		webview.getSettings().setJavaScriptEnabled(true);
		webview.getSettings().setBuiltInZoomControls(true);
		webview.addJavascriptInterface(new JavaScriptInterface(this), "Android");

		webview.loadUrl("file:///android_asset/imagemap.html");
	}

	@Override
	public boolean onKeyDown(int keyCode, KeyEvent event) {
		if ((keyCode == KeyEvent.KEYCODE_BACK) && webview.canGoBack()) {
			webview.goBack();
			return true;
		}
		return super.onKeyDown(keyCode, event);
	}
}
